import { typeAddress, typePayment, typeOrderProductItem } from './cart'

export interface loginParams {
    email: string,
    password: string
}
export interface registerParams {
    email: string,
    password: string,
    name: string
}
export interface typeUserInfo {
    _id: string,
    name: string,
    email: string,
    isAdmin: boolean,
    token?: string
}
export interface typeOrder {
    createdAt: string,
    isDelivered: boolean,
    deliveredAt: Date,
    isPaid: boolean,
    paidAt: Date,
    isReceived: boolean,
    receivedAt: Date,
    productsPrice: number,
    productsItems: typeOrderProductItem[],
    paymentMethod: typePayment,
    shippingAddress: typeAddress,
    shippingPrice: number
    totalPrice: number
    updatedAt: number,
    user: typeUserInfo
    _id: string
}

export interface updateUserProps {
    email?: string,
    password?: string,
    name?: string,
    isAdmin?: boolean
  }
